package it.softphone.cmc.server.service.exception;

import it.softphone.commons.json.server.JSONUtils;
import it.softphone.commons.service.LogAware;



/**
 * 
 * @author bsorrentino
 *
 */
@SuppressWarnings("serial")
public class CMCException extends Exception implements LogAware {

	public CMCException() {
	}

	public CMCException(String msg) {
		super(msg);
		
		logger.error( msg );
	}

	public CMCException(Throwable t) {
		super(t);

		logger.error( t );
	}

	public CMCException(String msg, Throwable t) {
		super(msg, t);

		logger.error( msg, t );
	}

	/**
	 * Use JSONUtils.toJSON
	 * 
	 * @param e
	 * @return json string 
	 * @see it.softphone.commons.json.server.JSONUtils#toJSON
	 */
	@Deprecated
	public static String toJSON( Exception e ) {	
		return JSONUtils.toJSON(e);
	}
}
